Changes since 9 September 2022

delayedActions now throws an error if the action is "delayed" to a turn/tribe in the past.

eventTools.lua rendered superfluous as the unit upgrade check can work even if there is no next unit activated.  File is still available and references (in promotion.lua, parameters.lua, events.lua) are commented out, just in case a problem arises and they must be restored.

munitions.lua no longer requires air units to be left with 1 movement point after generating the munition.  munitionsSettings.lua runs the function to disable this as part of standard code. (For backwards compatibility of functionality, the function must be run to allow air units to have zero MP)


Added Pablostuka's text.initCap function which capitalizes the first letter of each word in the string.

Modified code provided by Pablostuka for gen.getBearing function.


fixed bug in traits.lua


range for land and sea disabled by default

make ships defend first, don't re-define the defender value modifier function

unitData, cityData, tileData created


tables with metatables are not "state savable" according to gen.isStateSavable

traits.assign and traits.unassign generate errors if traits.allowedTraits has not been executed yet

non-english characters are anglicised by makeObject.lua instead of deleted.  This function is also in text.lua

fixed bug in radar.lua

integrated seasonSettings.lua into the template.

Traits can now be assigned to all the items in a table.

fixed bugs in combatSettings.lua

created combatModifiers.lua



bugfix in munitions.lua and promotions.lua so that munition users get promoted

created changeRules.lua to change ephemeral entries by reading rules.txt type files, and keeps track of defaults for those ephemeral values.

in gen.calculateWeight, function weights can now return false.
created gen.getRandomTileInPolygon

leader bonus code

added onUnitDeleted to discreteEvents (and events.lua)


added extra substitution options to text.substitute

added textSettings.lua, to control text.substitute

added ability to get individual unit images

fixed bug in leaderBonus.lua

added "menuRecords" to text.lua

added customCosmic module

updated generalLibrary to integrate with changeRules and customCosmic,
if these modules are available, but it should work if they are absent.
Some new generalLibrary functions are also made available, and
the general library has a constants table, too.

added comments to facilitate auto documentation

minor changes to fix issues noted while documenting, in particular added a check for sleeping/fortified units at the end of turn for onFinalOrderGiven.

Added the configuration module.


Supplemental Data modules have LuaLS documentation.

Changed Legacy Event Engine to be able to operate independently of the general library and secureHashAlgorithm modules, and eliminated warning message for games that have never been saved with a modern version of the legacy event engine.

fixed bug where carried units are sometimes not killed with the sea transport.

added an onCityWindowOpened event for discreteEvents and events files.

can now return true or function to cancel unit activation in onActivateUnit events.

Fixed navy bug where aircraft carriers expelled aircraft from port.

Fixed munitions shooter bug
make events.lua do the kill event for missile units after a successful attack

Fixed bug in changeRules.lua, where @cosmic2 wasn't being read due to a typo.

Added land and air transport.


last update

todo





